package cn.qingfeng.a003_chat_v2.server.groupsession;

import cn.qingfeng.a003_chat_v2.server.groupsession.Group;
import io.netty.channel.Channel;

import java.util.List;
import java.util.Set;

public interface GroupSession {
    Group createGroup(String groupName, Set<String> members);
    Set<String> getMembers(String groupName);
    List<Channel> getMembersChannel(String groupName);

    /**
     * 加入群聊
     * @param groupName
     * @param member
     * @return
     */
    Group joinMember(String groupName, String member);

    /**
     * 踢出群聊
     * @param groupName
     * @param member
     * @return
     */
    Group removeMember(String groupName, String member);

}
